import Vue from 'vue'
import VueRouter from 'vue-router'
// 特性继承
// 路由的懒加载
const props01 = () => import('../views/01props/index.vue')
const attrs02 = () => import('../views/02$attrs/index.vue')
const listeners03 = () => import('../views/03$listeners/index.vue')
const dongtai04 = () => import('../views/04dongtai/index.vue')
// const slot05 = () => import('../views/05slot/index.vue')

Vue.use(VueRouter)

const routes = [
  { path: '/props01', component: props01 },
  {
    path: '/attrs02',
    component: attrs02
  },
  {
    path: '/listeners03',
    component: listeners03
  },
  {
    path: '/dongtai04',
    component: dongtai04
  },
  {
    path: '/slot05',
    component: () => import('../views/05slot/index.vue')
  },
  {
    path: '/selfcom06',
    component: () => import('../views/06selfcom/index.vue')
  },
  {
    path: '/selfcom07',
    component: () => import('../views/06selfcom/default.vue')
  },
  {
    path: '/scopedanddeep07',
    component: () => import('../views/07scoped&deep/index.vue')
  },
  {
    path: '/mock08',
    component: () => import('../views/08mock/index.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
